home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
doors_1
/
makeport.zip
/
MAKEPORT.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1991-09-04
|
1KB
|
37 lines
program makeport; {This program installes com ports not installed because
of buggy BIOSes often when a 16550 is installed, or
deinstalled by DOS sometimes. Simply put makeport in
the autoexec.bat file, and the ports will be installed
when you boot the computer. The command format is:
MAKEPORT This will install com1
MAKEPORT 1 This will also install com1
MAKEPORT 2 This will install com2
MAKEPORT 3 This will install com3 at 3E8
MAKEPORT 4 This will install com4 at 2E8}
var port :array [1..4] of word absolute $40:0;
portnum,errorcode :word;
begin
if paramcount = 0 then
port[1] := $3f8
else
begin
val(paramstr(1),portnum,errorcode);
if errorcode <> 0 then
begin
writeln('Error ',errorcode,' converting ',paramstr(1),' to a number.');
halt(1);
end;
case portnum of
1: port[1] := $3f8;
2: port[2] := $2f8;
3: port[3] := $3e8;
4: port[4] := $2e8;
else Writeln('Com ports 0 and over 4 not supported.')
end; {case of}
end;
end.